﻿@model EnumSample.Models.MyData

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>MyData</h4>
        <hr />
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.Id)

        <div class="form-group">
            @Html.LabelFor(model => model.Enum1, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Enum1, templateName: "Enum-radio")
                @Html.ValidationMessageFor(model => model.Enum1)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Enum2, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Enum2, templateName: "Enum-radio")
                @Html.ValidationMessageFor(model => model.Enum2)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.FlagsEnum, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.FlagsEnum)
                @Html.ValidationMessageFor(model => model.FlagsEnum)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

<script src="~/Scripts/jquery-2.1.1.js"></script>
<script src="~/Scripts/jquery.validate.min.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
